package org.carl.feishu.test.controller;

import org.carl.base.dingtalk.bot.annotation.DingTalkNotify;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("dingtalk")
public class DingTalkController {

    @GetMapping("test")
    @DingTalkNotify(botId = "1", template = "测试 姓名:{},年龄:{}", args = {"#name", "#age-1"}, condition = "#age >= 18")
    public String test(String name, Integer age) throws Exception {
        return name;
    }
}
